package com.guo.hui.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.guo.hui.model.ponal.Cate;
import com.guo.hui.service.ResumeFrontService;
import com.guo.hui.util.UtilJson;

@Controller
@RequestMapping(value = "/resume/front")
public class ResumeWebController {

	private static final String BASE_PATH = "resume/front/";

	@Autowired
	private ResumeFrontService resumeFrontService;

	@RequestMapping(value = "/index")
	public String index() {
		return BASE_PATH + "index";
	}

	@ResponseBody
	@RequestMapping(value = "/frontdata")
	public String frontdata(Model mm) {
		Map<String, Object> map = new HashMap<String, Object>();
		List<Cate> list = resumeFrontService.queryByMap(map);
		return UtilJson.toJson(list);
	}

}
